package pack0901;


import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class DemoE3 {
    public static void main(String[] args) {
        ExecutorService es = Executors.newSingleThreadExecutor();
        DemoE31 demoE31 = new DemoE31();
        DemoE31 demoE32 = new DemoE31();
        DemoE31 demoE33 = new DemoE31();
        DemoE31 demoE34 = new DemoE31();
        es.execute(demoE31);
        es.execute(demoE32);
        es.execute(demoE33);
        es.shutdownNow();
        es.execute(demoE34);
    }
}
class DemoE31 implements Runnable{
    @Override
    public void run() {
        System.out.println("aaa"+Thread.currentThread().getName());
    }
}
